package com.wzj.manage.service.impl;

import com.wzj.manage.entity.Manager;
import com.wzj.manage.mapper.ManagerMapper;
import com.wzj.manage.service.ManagerService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author wzj
 * @since 2021-04-09
 */
@Service
public class ManagerServiceImpl extends ServiceImpl<ManagerMapper, Manager> implements ManagerService {

    @Autowired
    public ManagerMapper managerMapper;
    @Override
    public List<Manager> selectManager(Manager manager) {
        String managerAccount = manager.getManagerAccount();
        String managerPassword = manager.getManagerPassword();
        HashMap<String,Object> map=new HashMap<String,Object>();
        map.put("manager_account",managerAccount);
        map.put("manager_password",managerPassword);
        List<Manager> managers = managerMapper.selectByMap(map);
        managers.forEach(System.out::println);
        return managers;
    }
}
